package com.my.api;

import com.my.service.UserGradeClassService;
import com.my.util.Rest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api")
@CrossOrigin
public class UserGradeClassApiController {

    @Autowired
    private UserGradeClassService service;

    @GetMapping("getByUserIdGradeClass")
    public Rest getByUserIdGradeClass(Long userId) {
        return Rest.ok().setData("list", service.getByUserId(userId));
    }

}
